import { executeSql } from './src/util/db.js';

async function testArticles() {
  try {
    console.log('=== 检查文章内容示例 ===');
    let result = await executeSql('select id, title, LEFT(content, 500) as content_preview from articles where isDelete = 0 limit 3');
    
    result.forEach((item, index) => {
      console.log(`文章 ${index + 1} (ID: ${item.id}):`);
      console.log(`标题: ${item.title}`);
      console.log(`内容前500字符:`, item.content_preview);
      console.log('---分割线---');
    });
  } catch (error) {
    console.error('查询失败:', error);
  }
}

testArticles();
